#!/bin/bash
datestr=`date +%m_%d_%H_%M_%S`
dirpath="/tmp/log/omat/topinfo/"
if [ ! -d $dirpath ]; then
    mkdir -p $dirpath
fi
find $dirpath -mmin +1440 |xargs -i rm -f {}
filepath=$dirpath"$datestr"
#echo $filepath
timeout 5 strace top -b -n 2 1>"$filepath" 2>&1 